-- GENERATED SPELL FOR [Smolderthorn Mystic] --


function spell0_9239(pUnit, Event) --@Chain Heal,Heal--
pUnit:FullCastSpellOnTarget(15799,pUnit)
pUnit:RegisterEvent('Sorts_9239', 2500, 1)
end

function spell1_9239(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(16006,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9239', 3000, 1)
end

function Sorts_9239(pUnit, Event)
local choix_sorts_9239 = math.random(0, 1)
if choix_sorts_9239 == 0 then
pUnit:RegisterEvent('spell0_9239', 1, 1)
end
if choix_sorts_9239 == 1 then
pUnit:RegisterEvent('spell1_9239', 1, 1)
end
end

function mob9239_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9239', math.random(1500, 3000), 1)
end

function mob9239_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9239_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9239_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9239, 1, 'mob9239_Action')
RegisterUnitEvent(9239, 2, 'mob9239_Leave')
RegisterUnitEvent(9239, 3, 'mob9239_Kill')
RegisterUnitEvent(9239, 4, 'mob9239_Die')
